home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / IISTATE.CMD < prev    next >
Encoding:
Text File  |  1996-02-12  |  1.4 KB  |  86 lines

  1. #    This is a basic template of the LOGIN.CMD file for 
  2. #    Internet Interstate
  3. #
  4. #trace on
  5. #
  6. # set up some strings for dialling up
  7. #
  8. if ![load $number]
  9.   $number = "301-652-6100"
  10.   save $number
  11.   load $number
  12.   if [query $number "Enter your dial up phone number"]
  13.     save $number
  14.   end
  15. end
  16. if ![load $username]
  17.   if [username "Enter your login username"]
  18.     save $username
  19.   end
  20. end
  21. if ![load $password]
  22.   if [password "Enter your login password"]
  23.     save $password
  24.   end
  25. end
  26. $modemsetup = "&c1"
  27. $userprompt = "ogin:"
  28. $passprompt = "assword:"
  29.  
  30. %attempts = 10
  31. #
  32. #
  33. #----------------------------------------------------------
  34. #
  35. # initialize modem
  36. #
  37. output "atz"\13
  38. if ! [input 10 OK\n]
  39.   display "Modem is not responding"\n
  40.   abort
  41. end
  42. #
  43. # setup our modem commands
  44. #
  45. output "at"$modemsetup\13
  46. input 10 OK\n
  47. #
  48. # send phone number
  49. #
  50. %n = 0
  51. repeat
  52.   if %n = %attempts
  53.     display "Too many dial attempts"\n
  54.     abort
  55.   end
  56.   output "atdt"$number\13
  57.   %ok = [input 60 CONNECT]
  58.   %n = %n + 1
  59. until %ok
  60. input 10 \n
  61. #
  62. #  wait till it's safe to send because some modem's hang up
  63. #  if you transmit during the connection phase
  64. #
  65. wait 30 dcd
  66. #
  67. # now prod the terminal server
  68. #
  69. output \13
  70. #
  71. #  wait for the username prompt
  72. #
  73. input 30 $userprompt
  74. output $username\13
  75. #
  76. # and the password
  77. #
  78. input 30 $passprompt
  79. output $password\13
  80. #
  81. # we are now logged in
  82. #
  83. display \n
  84. #
  85. # now we are finished.
  86. #